<?php

namespace app\controller;

use app\model\TorrentBank;
use support\Request;

class TorrentBankController
{

    protected $noNeedLogin = [];
    public function index()
    {
        try {
            $result = TorrentBank::select();
            return json(["code" => 200, "msg" => "种子库获取成功", "data" => $result]);
        } catch (\Exception $e) {
            return json(["code" => 400, "msg" => "获取失败"]);
        }
    }

    public function run(){
        try {
            return json(["code" => 200, "msg" => "此功能已失效，只是前端还未去除"]);
        } catch (\Exception $e) {
            return json(["code" => 400, "msg" => $e->getMessage()]);
        }
    }

}
